The present invention relates generally to computer or other networks, and more particularly to protocol processing for information communicated between hosts such as computers connected to a network.
One of the most CPU intensive activities associated with performing network protocol processing is the need to copy incoming network data from an initial landing point in system memory to a final destination in application memory. This copying is necessary because received network data cannot generally be moved to the final destination until the associated packets are: A) analyzed to ensure that they are free of errors, B) analyzed to determine which connection they are associated with, and C) analyzed to determine where, within a stream of data, they belong. Until recently, these steps had to be performed by the host protocol stack. With the introduction of the intelligent network interface device (as disclosed in U.S. patent application Ser. Nos. 09/464,283, 09/439,603, 09/067,544, and U.S. Provisional Application Serial No. 60/061,809), these steps may now be performed before the packets are delivered to the host protocol stack.
Even with such steps accomplished by an intelligent network interface device, there is another problem to be addressed to reduce or eliminate data copying, and that is obtaining the address of the destination in memory and passing that address to the network interface device. Obtaining this address is often difficult because many network applications are written in such a way that they will not provide the address of the final destination until notified that data for the connection has arrived (with the use of the xe2x80x9cselect( )xe2x80x9d routine, for example). Other attempts to obtain this address involve the modification of existing applications. One such example is the Internet Engineering Task Force (IETF) Remote DMA (RDMA) proposal, which requires that existing protocols such as NFS, CIFS, and HTTP be modified to include addressing information in the protocol headers. A solution is desired that does not require the modification of existing applications or protocols.
A multi-packet message (for example, a session layer message) is to be received onto a Network Interface device (NI device) and the data payload of the message is to be placed into application memory in a host computer. The NI device receives the first packet of the message and passes a first part of this first packet to the operating system on the host. In one embodiment, the first part of the first packet includes the session layer header of the message. The operating system passes this first part of the first packet to an application program. The application program uses the first part of the first packet to identify an address of a destination in application memory where the entire data payload is to be placed. The application program returns the address to the operating system and the operating system in turn forwards the address to the NI device. The NI device then uses the address to place the data portions of the various packets of the multi-packet message into the destination in application memory. In one embodiment, the NI device DMAs the data portions of the packets from the NI device directly into the destination. In some embodiments, the NI device DMAs only data into the destination such that the destination contains the data payload in one contiguous block without any session layer header information, without any transport layer header information, and without any network layer header information.
In some embodiments, the NI device is an interface card that is coupled to the host computer via a parallel bus (for example, the PCI bus). In other embodiments, the NI device is integrated into the host computer. For example, the NI device may be part of communication processing device (CPD) that is integrated into the host computer.
Other structures and methods are described in the detailed description below. This summary does not purport to define the invention. The invention is defined by the claims.